import { Button } from 'antd';
import { FC, ReactNode } from 'react';

import { useMainButtonStyle } from './styles.tsx';
interface IButtonProps {
    reject?: boolean
    children: ReactNode,
    width?: number
    onClick: () => void;
    disabled?: boolean;
}
export const MainButton:FC<IButtonProps> = ({ children, reject = false, width = 287, onClick, disabled=false }) => {
    const { styles } = useMainButtonStyle();
    return (
        <Button
            type={reject ? 'default' : 'primary'}
            disabled={disabled}
            className={styles.button}
            style={{
                width: `${width}px`,
                height: '50px',
            }}
            onClick={onClick}
        >
            {children}
        </Button>
    );
};

